<!--********************************************************************
* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title data-i18n="resources.title_vectorTileLayerDarkBlue"></title>
    <script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text" id="cartoCssStr">
        /*此处定义不同的颜色变量，在后面可以重复用这些颜色值*/

        @waterColor:rgb(2,16,25);
        @roadColora:rgb(18,117,142);
        @roadColorb:rgb(0,0,0);
        @railwayColora:rgb(0,0,0);
        @railwayColorb:rgb(0,0,0);
        @vegetationColor:rgb(2,16,25);
        @continentColor:rgb(8,48,75);
        @provinceLineColor:rgb(30,30,30);


        /*中国除外的其他国家的图层*/

        #World_Continent_pl___China{
        polygon-fill:@continentColor;
        line-width:1;
        line-color:@continentColor;
        }
        #China_Province_pl___China{
        polygon-fill:@continentColor;
        line-color:rgba(0,0,0,0);
        }

        #Arterial_Road_ln___China::one{
        line-color:@roadColora;
        line-width:2;}
        #Arterial_Road_ln___China::two{
        line-color:@roadColorb;
        line-width:1;}

        #Arterial_Road_ln___China___1::one{
        line-color:@roadColora;
        line-width:2;}
        #Arterial_Road_ln___China___1::two{
        line-color:@roadColorb;
        line-width:1;}

        #Arterial_Road_ln___China___1___1::one{
        line-color:@roadColora;
        line-width:2;}
        #Arterial_Road_ln___China___1___1::two{
        line-color:@roadColorb;
        line-width:1;}

        #Main_Road_L___China::one{
        line-color:@roadColora;
        line-width:2;}
        #Main_Road_L___China::two{
        line-color:@roadColorb;
        line-width:1;}

        #Main_Road_L___China___1::one{
        line-color:@roadColora;
        line-width:2;}
        #Main_Road_L___China___1::two{
        line-color:@roadColorb;
        line-width:1;}

        #Main_Road_L___China___1___1::a{
        line-color:@roadColora;
        line-width:2;}
        #Main_Road_L___China___1___1::b{
        line-color:@roadColorb;
        line-width:1;}

        #Hydside_Area_pl___Hydside{
        polygon-fill:@waterColor;
        line-color:@waterColor;
        }

        #China_Provinces_L___China400{
        line-dasharray:10,10;
        line-color:@provinceLineColor;
        line-width:1;
        }

</script>
<script type="text/javascript">
    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
    var map, layer,
        url = host + "/iserver/services/map-china400/rest/maps/China";
    map = L.map('map', {
        center: [39.89, 116.43],
        maxZoom: 12,
        zoom: 11
    });
    var cartoCSS = document.getElementById("cartoCssStr").text;
    layer = new L.supermap.TiledVectorLayer(url, {
        cacheEnabled: true,
        cartoCSS: cartoCSS,
        serverCartoCSSStyle: false,
        attribution: "Tile Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>"
    }).addTo(map);

</script>
</body>
</html>